home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / gs3.53 / use.doc < prev    next >
Text File  |  1996-01-10  |  51KB  |  1,246 lines

  1.    Copyright (C) 1989, 1995 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17.  
  18. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  19.  
  20. This file, use.doc, describes how to use the Ghostscript language
  21. interpreter.
  22.  
  23. For an overview of Ghostscript and a list of the documentation files, see
  24. README.  
  25.  
  26. ********
  27. ******** How to install Ghostscript ********
  28. ********
  29.  
  30. To run Ghostscript, you need the executable program, and also some
  31. external initialization files:
  32.     gs_*.ps (see psfiles.doc for the full list), unless Ghostscript was
  33.       compiled using the "compiled initialization files" option
  34.     pdf_*.ps if you want to interpret PDF files.
  35.     Fontmap, unless you plan to always invoke Ghostscript with the
  36.       -dNOFONTMAP switch
  37.  
  38. The file name of the executable program depends on the environment;
  39. see the instructions for the specific platforms below.
  40.  
  41. The Ghostscript fileset includes a set of fonts (.gsf files); you should
  42. have them on line as well, unless you have a complete set of other fonts
  43. (such as ATM or Display PostScript fonts) and are using a Fontmap and/or
  44. GS_FONTPATH that references them.
  45.  
  46. The fonts distributed with Ghostscript are of low quality, because we
  47. couldn't find any better ones that were free.  If you have an H-P PostScript
  48. printer, you can get better fonts by calling H-P at (303)-339-7009.  The
  49. driver set to ask for is Adobe Type Manager V2.51, and the disk set number
  50. is MP210en3.  Please note that mentioning anything other than Microsoft
  51. Windows when you ask for the driver set will probably lead to great
  52. confusion on the other end (but the fonts will work with Ghostscript on any
  53. platform, not just MS Windows).
  54.  
  55. VMS
  56. ---
  57.  
  58. Installing Ghostscript on a VMS system requires compiling it first.  The
  59. name of the executable is GS.EXE.
  60.  
  61. You should install all the files, including the fonts, in the same
  62. directory as the executable and initialization files.  By default, this is
  63. the directory in which you did the compilation.  Consult the command file
  64. (VMS*.MAK) for more details.
  65.  
  66. If you have DECWindows/Motif installed, you may wish to replace the FONTMAP
  67. file with the file FONTMAP.VMS.  Read the comment at the beginning of the
  68. latter file for more information.
  69.  
  70. MS-DOS
  71. ------
  72.  
  73. There are two MS-DOS executables in the standard Ghostscript
  74. distribution:
  75.     - GS.EXE runs on any MS-DOS machine, but is limited to 640K.
  76.     - GS386.EXE runs on any 386 or 486 machine, and will use all
  77. available extended (not expanded) memory.
  78.  
  79. You should install all the files except the fonts in C:\GS, and the
  80. fonts in C:\GS\FONTS.
  81.  
  82. If you have Adobe Type Manager fonts installed on your system, and you wish
  83. to use them with Ghostscript, you may wish to replace the FONTMAP file with
  84. FONTMAP.ATM, and to add to the environment variable GS_LIB the name of the
  85. directory where the fonts are located (see below for more information about
  86. GS_LIB).  Before you do this, please read carefully the license that
  87. accompanies the ATM fonts; Aladdin Enterprises takes no responsibility for
  88. any possible violations of such licenses.  Similarly, if you have Adobe
  89. Type Basics, you may wish to replace FONTMAP with FONTMAP.ATB.
  90.  
  91. MS Windows
  92. ----------
  93.  
  94. The name of the executable is GSWIN.EXE.  Ghostscript probably requires
  95. Windows 3.1, and you must run Windows in 386 Enhanced or Standard (not
  96. Real) mode.  Since Ghostscript is a large program, you will need to run
  97. Windows in Enhanced mode (so that it can provide virtual memory) unless
  98. you have at least 6 Mb of RAM.
  99.  
  100. You should install all the files except the fonts in C:\GS, and the fonts
  101. in C:\GS\FONTS.
  102.  
  103. See under "MS-DOS" above for information about using Adobe Type Manager
  104. fonts with Ghostscript.
  105.  
  106. The files COMMDLG.DLL and SHELL.DLL supplied with Ghostscript are only for
  107. use with Windows 3.0.  If you have Windows 3.1, delete these files, since
  108. Windows itself provides versions of them.
  109.  
  110. If your system uses TrueType fonts, you can get them converted to a
  111. Ghostscript-compatible format at the time you select your "printer" by
  112. doing the following:
  113.  
  114. 1)    Open control panel and double click on the printers icon.
  115. 2)    Select your Postscript Printer.
  116. 3)    Choose Setup.
  117. 4)    Choose Options.
  118. 5)    Choose Advanced.
  119. 6)    At the top of the Dialog Box you will see TrueType Fonts
  120.     Send to Printer As: <drop down menu>
  121.     Choose Adobe Type 1.
  122. 7)    Uncheck Use Printer Fonts for All TrueType Fonts
  123.     and Use Substitution Table.
  124. 8)    OK.
  125. 9)    OK etc.
  126.  
  127. That's it!  Your TrueType fonts will automatically be downloaded in your
  128. PostScript file for Ghostscript to use.
  129.  
  130. For printer devices, the default output is:
  131.   the default printer (Win95 or WinNT)
  132. OR
  133.   prompt for a printer port (Win16 or Win32s).
  134. This can be modified as follows.
  135.   -sOutputFile="LPT1:"
  136.        Output to named port.
  137.   -sOutputFile="\\spool\printer name"   (Win95 or WinNT only)
  138.        Output to named printer.
  139.   -sOutputFile="\\spool"                (Win95 or WinNT only)
  140.        Prompt for printer name.  Local printers only are supported.
  141. For Win32s, make sure that gs16spl.exe is in the same directory
  142. as gswin32.exe.
  143.   
  144.  
  145. OS/2 2.x
  146. --------
  147.  
  148. The Ghostscript OS/2 implementation is designed for OS/2 2.1.  A few people
  149. have used it successfully under OS/2 2.0, but it has had very little
  150. testing.
  151.  
  152. The name of the executable is GSOS2.EXE.  This is a text application that
  153. will run windowed or full screen.  The default device is "os2pm" which
  154. displays output in a Presentation Manager window using the external driver
  155. GSPMDRV.EXE.  GSPMDRV.EXE must be located in the same directory as
  156. GSOS2.EXE or on the PATH.
  157.  
  158. GSOS2.EXE and GSPMDRV.EXE are compiled using EMX/GCC 0.9b.  You must have
  159. the EMX DLL's on your LIBPATH.  These are available from
  160.     ftp://hobbes.nmsu.edu/os2/unix/emx09b/emxrt.zip
  161.  
  162. The system menu of the Ghostscript Image window includes a "Copy" command
  163. to copy the currently displayed bitmap to the Clipboard.
  164.  
  165. OS/2 comes with some Adobe Type Manager fonts. If you wish to use these
  166. with Ghostscript, you should replace the FONTMAP file with FONTMAP.OS2,
  167. and add to the environment variable GS_LIB the name of the directory where
  168. the fonts are located, usually c:\psfonts.  (see below for more
  169. information about GS_LIB).  Before you do this, please read carefully the
  170. license that accompanies the ATM fonts; Aladdin Enterprises takes no
  171. responsibility for any possible violations of such licenses.
  172.  
  173. Since GSOS2.EXE is not a PM application, it cannot determine the depth of
  174. the PM display.  You must provide this information using the
  175. -dBitsPerPixel option.  The default is 8 bits/pixel.  Valid values are 1,
  176. 4, 8, 16 & 24.
  177.   For monochrome VGA use      -dBitsPerPixel=1
  178.   For standard VGA screen use -dBitsPerPixel=4
  179.   For 256 colour SVGA use     -dBitsPerPixel=8
  180. A command file gspm.cmd containing the following line may be useful:
  181.   @c:\gs\gsos2.exe -Ic:/gs;c:/gs/fonts;c:/psfonts -sDEVICE=os2pm 
  182.       -dBitsPerPixel=8 -sPAPERSIZE=a4 %1 %2 %3 %4 %5 %6 %7 %8
  183.  
  184. While drawing, the os2pm driver updates the display every 5 seconds.  On
  185. slow computers this is undesirable and a different interval can be
  186. specified in milliseconds with the -dUpdateInterval option.  The default
  187. is -dUpdateInterval=5000; to disable update use -dUpdateInterval=0.
  188.  
  189. Standard VGA is very slow due to double buffering to avoid bugs and due to
  190. 1 plane to 4 plane conversion.  Use a 256 color display driver by
  191. preference.  Many display drivers have bugs which cause 1 bit/pixel
  192. bitmaps to be displayed incorrectly.
  193.  
  194. GSOS2.EXE and GSPMDRV.EXE will stay in memory for the number of minutes
  195. specified in the environment variable GS_LOAD.
  196.  
  197. Ghostscript can also be run in a DOS box.  Please read the MS-DOS notes, 
  198. since they apply to this environment as well.
  199.  
  200. If you run GS386 in the OS/2 2.0 or 2.1 DOS Box, you must select the
  201. "ENABLED" setting for the DPMI_DOS_API option of the DOS Box.  GS386
  202. will not run with the "AUTO" setting.
  203.  
  204. For printer devices, output goes to the default queue.
  205. To print to a specified queue, use -sOutputFile=\\spool\NullLPT1
  206. where NullLPT1 is the queue physical name.
  207.  
  208. Unix
  209. ----
  210.  
  211. Installing Ghostscript on a Unix system requires compiling it first: please
  212. read the Unix section(s) in make.doc for more information, especially
  213. regarding how to decide which makefile to use and how you may need to edit
  214. it.  The name of the executable is gs.  The makefile installs all the files,
  215. except the fonts, in /usr/local or various subdirectories thereof.  The
  216. fonts should be installed in /usr/local/lib/ghostscript/fonts.  Consult the
  217. makefile for more details.
  218.  
  219. ********
  220. ******** Shell scripts for Ghostscript
  221. ********
  222.  
  223. The Ghostscript distribution includes several Unix shell scripts for
  224. driving Ghostscript in different environments.  These are all
  225. user-contributed code: please contact the user identified in the file, not
  226. Aladdin Enterprises, if you have questions.
  227.  
  228. > pv.sh - preview a specified page of a dvi file in an X window.
  229.  
  230. > sysvlp.sh - System V 3.2 lp interface for parallel printer.
  231.  
  232. > pj-gs.sh - printing on an H-P PaintJet under HP-UX.
  233.  
  234. > unix-lpr.sh - queue filter for lpr under Unix.
  235. > lprsetup.sh - setup for unix-lpr.sh.
  236.  
  237. If one of these serves your needs, you may be able to skip most of
  238. the rest of this document.
  239.  
  240. ********
  241. ******** How to use Ghostscript ********
  242. ********
  243.  
  244. To invoke the interpreter, give the command
  245.     gs <filename1> ... <filenameN>
  246. The interpreter will read in the files in sequence and execute them.
  247. After doing this, it reads further input from the primary input stream
  248. (normally the keyboard).  Each line (i.e. characters up to a <return>) is
  249. interpreted separately.  To exit from the interpreter, type quit<return>.
  250. The interpreter also exits gracefully if it encounters end-of-file.
  251. Typing the interrupt character, e.g., control-C, is also safe.
  252.  
  253. The interpreter recognizes several switches described below, which may appear
  254. anywhere in the command line and apply to all files thereafter.
  255.  
  256. You can get a brief help message by invoking Ghostscript with
  257.     gs -h
  258. or
  259.     gs -?
  260. This message also lists the available devices.  For a little more
  261. information about available devices, a one-line description of each device
  262. appears near the beginning of the file devs.mak.
  263.  
  264. Choosing the output device
  265. --------------------------
  266.  
  267. Ghostscript may be built with multiple output devices.  Ghostscript
  268. normally opens the first one and directs output to it.  To use device xyz
  269. as the initial output device, include the switch
  270.     -sDEVICE=xyz
  271. in the command line.  Note that this switch must precede the first .ps
  272. file, and only its first invocation has any effect.  For example, for
  273. printer output in a normal configuration that includes an Epson printer
  274. driver, you might use the shell command
  275.     gs -sDEVICE=epson myfile.ps
  276. instead of just
  277.     gs myfile.ps
  278. Alternatively, once you are inside Ghostscript, you can type
  279.     (epson) selectdevice
  280.     (myfile.ps) run
  281. All output then goes to the printer instead of the display until further
  282. notice.  You can switch devices at any time by using the selectdevice
  283. procedure, e.g.,
  284.     (vga) selectdevice
  285. or
  286.     (epson) selectdevice
  287. As yet a third alternative, you can define an environment variable
  288. GS_DEVICE as the desired default device name.  The order of precedence for
  289. these alternatives, highest to lowest, is:
  290.     selectdevice
  291.     (command line)
  292.     GS_DEVICE
  293.     (first device in build list)
  294.  
  295. To select the resolution on a printer, use the shell command
  296.     gs -sDEVICE=<device> -r<xres>x<yres>
  297. For example, on a 9-pin Epson-compatible printer, you can get the
  298. lowest-resolution (fastest) mode with
  299.     gs -sDEVICE=epson -r60x72
  300. and the highest-resolution mode with
  301.     gs -sDEVICE=epson -r240x72.
  302. On a 24-pin printer, the lowest resolution is
  303.     gs -sDEVICE=epson -r60x60
  304. and the highest-resolution 24-pin mode is
  305.     gs -sDEVICE=epson -r360x180
  306.  
  307. If you select a printer as the output device, Ghostscript also allows you
  308. to control where the device sends its output.  Normally, output goes
  309. directly to the printer (PRN) on MS-DOS systems, and to a scratch file on
  310. Unix or VMS systems.  To send the output to a series of files foo1.xyz,
  311. foo2.xyz, ..., use the switch
  312.     -sOutputFile=foo%d.xyz
  313. (For compatibility with older versions of Ghostscript, -sOUTPUTFILE=
  314. also works.)  The %d is a printf format specification; you can use
  315. other formats like %02d.  Each file will receive one page of output.
  316. Alternatively, to send the output to a single file foo.xyz, with all
  317. the pages concatenated, use the switch
  318.     -sOutputFile=foo.xyz
  319.  
  320. On Unix systems, you can send the output directly to a pipe.  For
  321. example, to pipe the output to the command `lpr' (which, on many Unix
  322. systems, is the command that spools output for a printer), use the
  323. switch
  324.     -sOutputFile=\|lpr
  325. You can also send output to stdout for piping with the switch
  326.     -sOutputFile=-
  327. In this case you must also use the -q switch, to prevent Ghostscript from
  328. writing messages to stdout.
  329.  
  330. File formats like PCX and PBM are also 'devices'.  When you select a file
  331. format as the 'device', you must also specify an output file, e.g.,
  332.     gs -sDEVICE=pcxmono -sOutputFile=xyz.pcx
  333.  
  334. To find out what devices are available, type
  335.     devicenames ==
  336. after starting up Ghostscript.  Alternatively you can use the -h or
  337. -? switch in the command line, as described above.
  338.  
  339. Choosing paper size
  340. -------------------
  341.  
  342. Ghostscript is normally configured to expect U.S. letter paper.  To select
  343. a different paper size as the default, find the line in gs_init.ps that
  344. says
  345.  
  346.     % Optionally choose a default paper size other than U.S. letter.
  347.  
  348. The next line begins
  349.  
  350.     % (a4)
  351.  
  352. To select A4 as the default paper size, remove the % but do not change
  353. anything else.  To select a different default paper size, remove the % and
  354. replace the word a4 with the name of the desired paper size.  You can use
  355. any paper size listed in the table at the beginning of gs_statd.ps.
  356. (Individual documents can also specify a paper size, which will take
  357. precedence over the one specified on the command line.)
  358.  
  359. Alternatively, to select a different paper size for a single invocation of
  360. Ghostscript, you can use the command line switch
  361.     -sPAPERSIZE=a_known_paper_size
  362. e.g.,
  363.     -sPAPERSIZE=a4
  364. or
  365.     -sPAPERSIZE=legal
  366.  
  367. Finally, most (but not all) of Ghostscript's printer drivers can be
  368. configured at compile time to use A4 paper as the default by including
  369. -DA4 in the CFLAGS switches in the makefile.  See make.doc for more
  370. details.
  371.  
  372. File searching
  373. --------------
  374.  
  375. When looking for initialization files (gs_*.ps, pdf_*.ps), font files, the
  376. Fontmap file, and files for the 'run' operator, Ghostscript first checks
  377. whether the file name specifies an explicit directory or drive (i.e.,
  378. doesn't begin with '/' on Unix systems; doesn't begin with a '/' or '\' or
  379. contain ':' as the second character on MS-DOS systems; doesn't contain a ':'
  380. or a square bracket on VMS systems).  If it does, Ghostscript simply tries
  381. to open the file using the given name.  Otherwise, Ghostscript will try
  382. directories in the following order:
  383.  
  384.     - The current directory;
  385.  
  386.     - The directory/ies specified by the -I switch(es) in the command
  387.       line (see below), if any;
  388.  
  389.     - The directory/ies specified by the GS_LIB environment variable,
  390.       if any;
  391.  
  392.     - The directory/ies specified by the GS_LIB_DEFAULT macro in the
  393.       Ghostscript makefile, if any.
  394.  
  395. Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a
  396. single directory, or a list of directories separated by a character
  397. appropriate for the operating system (':' on Unix systems, ';' on VMS
  398. systems, ';' on MS-DOS systems).  We think that trying the current
  399. directory first is a very bad idea -- it opens serious security loopholes
  400. and can lead to very confusing errors if one has more than one version of
  401. Ghostscript in one's environment -- but when we attempted to change it,
  402. users insisted that we change it back.
  403.  
  404. When Ghostscript starts up, it also looks at the GS_FONTPATH environment
  405. variable, which is also a list of directories.  It goes to those
  406. directories and looks for all files that appear to contain PostScript
  407. fonts; it then effectively adds all those files and fonts to its internal
  408. copy of the Fontmap (the catalog of fonts and the files that contain
  409. them).  If you are using one of the following types of computer, you may
  410. wish to set GS_FONTPATH to the indicated value so that Ghostscript will
  411. automatically acquire all the installed Type 1 fonts:
  412.  
  413.     System type        GS_FONTPATH
  414.     -----------        -----------
  415.     DEC OSF/1        /usr/lib/X11/fonts/Type1Adobe
  416.     DEC Ultrix        /usr/lib/DPS/outline/decwin
  417.     HP-UX 9            /usr/lib/X11/fonts/type1.st/typefaces
  418.     IBM AIX            /usr/lpp/DPS/fonts/outlines
  419.       "            /usr/lpp/X11/lib/X11/fonts/Type1
  420.       "            /usr/lpp/X11/lib/X11/fonts/Type1/DPS
  421.     NeXT            /NextLibrary/Fonts/outline
  422.     SGI IRIX        /usr/lib/DPS/outline/base
  423.       "            /usr/lib/X11/fonts/Type1
  424.     Sun SunOS 4.x        /usr/openwin/lib/X11/fonts/Type1/outline
  425.       " (NeWSprint only)
  426.    newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/NeWSprint/small_openwin/lib/fonts
  427.     Sun Solaris 2        /usr/openwin/lib/X11/fonts/Type1/outline
  428.     VMS            SYS$COMMON:[SYSFONT.XDPS.OUTLINE]
  429.  
  430. These paths may not be exactly right for your installation; if the
  431. indicated directory doesn't contain files whose names are familiar font
  432. names like Courier and Helvetica, you may wish to ask your system
  433. administrator where to find these fonts.
  434.  
  435. NOTE: On Solaris systems simply setting GS_FONTPATH may not work, because
  436. for some reason some versions of Ghostscript can't seem to find any of the
  437. Type1 fonts in /usr/openwin/lib/X11/fonts/Type1/outline. It says: "15 files,
  438. 15 scanned, 0 new fonts". See Fontmap.Solaris instead.
  439.  
  440. Temporary files
  441. ---------------
  442.  
  443. By default, Ghostscript creates temporary files named _temp_XX.XXX in the
  444. current directory on MS-DOS and VMS systems, gsXXXXXX in the current
  445. directory on OS/2 systems, and gs_XXXXX in the /tmp directory on Unix
  446. systems.  You can change the directory in which Ghostscript will create
  447. these files by setting the TEMP environment variable to the name of the
  448. directory.
  449.  
  450. Ghostscript currently doesn't do a very good job of deleting temporary
  451. files when it exits; you may have to delete them manually from time to
  452. time.
  453.  
  454. Environment variable summary
  455. ----------------------------
  456.  
  457. GS_DEVICE
  458.     Defines the default output device.  Described above.
  459.  
  460. GS_FONTPATH
  461.     Specifies a list of directories that should be scanned for fonts
  462. at startup.  Described above.
  463.  
  464. GS_LIB
  465.     Provides a search path for initialization files and fonts.
  466. Described above.
  467.  
  468. GS_OPTIONS
  469.     Defines a list of command line arguments to be processed before
  470. the ones actually specified on the command line.  For example, setting
  471. GS_DEVICE to xxx is equivalent to setting GS_OPTIONS to -sDEVICE=xxx.  The
  472. contents of GS_OPTIONS are not limited to switches; they may include
  473. actual file names or even @file arguments.
  474.  
  475. TEMP
  476.     Defines a directory name for temporary files.  Described above.
  477.  
  478. ********
  479. ******** Using Ghostscript and Ghostview with PDF files
  480. ********
  481.  
  482. Ghostscript is normally configured (except on 16-bit MS-DOS platforms) so
  483. that it can interpret both PostScript and PDF files (the latter are
  484. sometimes incorrectly called "Acrobat files").  It examines each file to
  485. determine automatically whether it is a PDF file or a PostScript file.  All
  486. the normal switches and procedures for interpreting PostScript files also
  487. apply to PDF files, with a few exceptions noted below.  In addition, there
  488. is a shell script
  489.  
  490.         pdf2ps input.pdf output.ps
  491.  
  492. that converts PDF to (Level 2) PostScript.
  493.  
  494. Switches not applicable to PDF files
  495. ------------------------------------
  496.  
  497. You cannot use the `-' switch to provide PDF input from stdin or a pipe.
  498. The PDF language, unlike the PostScript language, inherently requires random
  499. access to the file.
  500.  
  501. Added switches for PDF files
  502. ----------------------------
  503.  
  504.     -dFirstPage=pagenumber
  505.         Starts interpreting on the given page of the document.
  506.  
  507.     -dLastPage=pagenumber
  508.         Stops interpreting after the given page of the document.
  509.  
  510. Ghostview and PDF files
  511. -----------------------
  512.  
  513. Since Ghostview pipes PostScript files to Ghostscript, you cannot view
  514. Ghostscript files with Ghostview just by saying
  515.         ghostview file.pdf
  516. Instead there are two options:
  517.  
  518.    1. Tanmoy Bhattacharya has written some patches for Ghostview 1.5
  519.    that allow it to read and display PDF files.  These are available
  520.    from:
  521.        ftp://gita.lanl.gov/people/tanmoy/hypertex/gv1.5gs3.33hack.tar.gz
  522.  
  523.    2. Start Ghostview as follows:
  524.           ghostview -arguments file.pdf quit.ps
  525.    This will allow you to display a PDF file, but you won't be able
  526.    to jump to particular pages.  Use Tanmoy's code if you want that
  527.    facility.
  528.  
  529. ********
  530. ******** Notes on specific platforms ********
  531. ********
  532.  
  533. VMS
  534. ---
  535.  
  536. On VMS systems, the last character of each "directory" name indicates what
  537. sort of entity the "directory" references.  If the "directory" name ends
  538. with a colon, it is taken as referring to a logical device, e.g.:
  539.     $ DEFINE GHOSTSCRIPT_DEVICE DUA1:[GHOSTSCRIPT_14]
  540.     $ DEFINE GS_LIB GHOSTSCRIPT_DEVICE:
  541. If the "directory" name ends with a closing square bracket, it is taken as
  542. referring to a real directory, e.g.:
  543.     $ DEFINE GS_LIB DUA1:[GHOSTSCRIPT]
  544.  
  545. To run Ghostscript with switches, you must type a command like
  546.  
  547.     $ gs "-dNODISPLAY"
  548.  
  549. because the C run time library will convert the command
  550. parameters/arguments to lowercase unless you enclose them in double quotes
  551. which preserves the case.
  552.  
  553. If you are on an X Windows display (for which gs is built), you can do
  554.  
  555.     $ set display/create/node="domain-name"/transport=tcpip
  556.  
  557. For example,
  558.  
  559.     $ set display/create/node="doof.city.com"/transport=tcpip
  560.  
  561. and then run Ghostscript
  562.  
  563.     $ gs
  564.  
  565. If you write printer output to a file and then want to print the file
  566. later, use the "/PASSALL" qualifier to the PRINT command.
  567.  
  568. In order to get PDF files (or PostScript files that use the setfileposition
  569. operator) to work properly on VMS systems, you must ensure that they are
  570. "stream LF" type files.  (**NOTE**: This only applies if you are using DEC C
  571. to compile Ghostscript; there is no known way to get these files to work
  572. properly with the old VAX C compiler.)  If you transfer files by FTP, you
  573. probably need to do one of the following two things after the transfer:
  574.  
  575. 1. If FTP'd in text/ASCII mode then do:
  576.  
  577.      $ CONVERT/FDL=STREAMLF.FDL input-file output-file
  578.  
  579.    where the contents of the file STREAMLF.FDL are given below.
  580.  
  581. 2. Otherwise, if FTP'd in binary mode do
  582.  
  583.      $ SET FILE/ATTRIBUTE=(RFM:STMLF)
  584.  
  585. The contents of the STREAMLF.FDL file are shown between, and exclusive of, the
  586. dashed lines:
  587.  
  588. -------------------------------------------------
  589. FILE
  590.         ORGANIZATION            sequential
  591.  
  592. RECORD
  593.         BLOCK_SPAN              yes
  594.         CARRIAGE_CONTROL        carriage_return
  595.         FORMAT                  stream_lf
  596. -------------------------------------------------
  597.  
  598. MS-DOS
  599. ------
  600.  
  601. Ghostscript supports many SuperVGA displays directly, most of them with
  602. more than 16 colors.  The complete list is in the file devs.mak, which is
  603. part of the Ghostscript source code.  (If you got Ghostscript under the
  604. Aladdin Ghostscript Free Public License, the person or place from which you
  605. got it is also required to make the source code available to you; if you
  606. got it under the GNU License, see the GNU License for more information.)
  607.  
  608. If you have a SuperVGA display that supports a 16-color mode with 800x600
  609. pixels, and you know the display mode number for this mode, you can select
  610. it by using the command line switches
  611.     -sDEVICE=svga16 -dDisplayMode=NNN
  612. where NNN is the display mode number in decimal.  The modes for some
  613. popular display chipsets are as follows:
  614.  
  615.     Acumos AVGA2, AVGA3                         88    (0x58)
  616.     Advance Logic AL2101                        43    (0x2B)
  617.     Ahead V5000                                 113    (0x71)
  618.     ATI VGAWONDER, Graphics Ultra etc.          84    (0x54)
  619.     Chips and Technologies                      106    (0x6A)
  620.     Cirrus Logic CL-GD 500/600                  100    (0x64)
  621.     Cirrus Logic GD 5422                        88    (0x58)
  622.     Compaq VGA                                  89    (0x59)
  623.     CTI                                         106    (0x6A)
  624.   * Genoa 5xxx, Sigma VGA                       41    (0x29)
  625.     Genoa 6xxx                                  106    (0x6A)
  626.     MXIC MX 68010                               85    (0x55)
  627.     NCR 77C22                                   88    (0x58)
  628.     OAK Technologies OTI-067, OTI-077, OTI037C  82    (0x52)
  629.     OAK Technologies OTI037C w/ NEL BIOS        91    (0x5B)
  630.   * Orchid Prodesigner                          41    (0x29)
  631.     Paradise                                    88    (0x58)
  632.     Poach                                       106    (0x6A)
  633.     Primus                                      42    (0x2A)
  634.     Realtek RT 3106                             31    (0x1F)
  635.     Tecmar                                      22    (0x16)
  636.     Trident 8900                                91    (0x5B)
  637.   * Tseng ET-3000, ET-4000                      41    (0x29)
  638.   * VEGA                                        41    (0x29)
  639.     Video 7 SVGA                                98    (0x62)
  640.     WD90C11                                     92    (0x5C)
  641.     Western Digital                             88    (0x58)
  642.  
  643. The ones marked * are the default (they all use the same value.)  If your
  644. card's chipset doesn't appear on this list, or if you try the value here
  645. and it doesn't work, please e-mail the chipset and correct display mode to
  646. ghost@aladdin.com for inclusion in future releases.
  647.  
  648. If you are running Ghostscript on a MS-DOS machine with a display that is
  649. not EGA/VGA compatible, you must use the Borland compiler.  You must build
  650. Ghostscript with the BGI driver as the default, and you will need the
  651. appropriate .BGI file from the Borland Turbo C library.  (Ghostscript
  652. includes the EGA/VGA driver in the executable.)
  653.  
  654. If you are using the BGI driver, two additional environment variables
  655. become relevant:
  656.  
  657.     BGIPATH - defines the directory where Ghostscript will look for
  658. the appropriate BGI driver.  If BGIPATH is not defined, Ghostscript will
  659. look in the directory defined as BGIDIR in the makefile.  In either case,
  660. if no driver is found in the designated directory, Ghostscript will look
  661. in the current directory.
  662.  
  663.     BGIUSER - a string of the form nn.dname, where nn is a hexadecimal
  664. number giving a display mode and dname is the name of a file containing a
  665. user-supplied BGI driver.  If BGIUSER is defined and the BGI device is
  666. selected, Ghostscript will supply nn as the display mode and will obtain
  667. the driver from the file named dname.
  668.  
  669. Some applications, such as Microsoft Word, require a prologue in front of
  670. the PostScript files they output.  In the case of Word, this is one of the
  671. *.ini files included with the Word distribution.  Other applications may
  672. require other prologues.  These may be specified on the Ghostscript
  673. command line, e.g.,
  674.     gs prologue.ini myfile.ps
  675.  
  676. X Windows
  677. ---------
  678.  
  679. Ghostscript looks for the following resources under the program name
  680. "ghostscript" and class name "Ghostscript":
  681.  
  682.     Name            Class            Default
  683.     ----            -----            -------
  684.     background        Background        white
  685.     foreground        Foreground        black
  686.     borderColor        BorderColor        black
  687.     borderWidth        BorderWidth        1
  688.     geometry        Geometry        NULL
  689.     xResolution        Resolution        **
  690.     yResolution        Resolution        **
  691.     useExternalFonts    UseExternalFonts    true
  692.     useScalableFonts    UseScalableFonts    true
  693.     logExternalFonts    LogExternalFonts    false
  694.     externalFontTolerance    ExternalFontTolerance    10.0
  695.     palette            Palette            Color
  696.     maxGrayRamp        MaxGrayRamp        128
  697.     maxRGBRamp        MaxRGBRamp        5
  698.         maxDynamicColors    MaxDynamicColors    256
  699.     useBackingPixmap    UseBackingPixmap    true
  700.     useXPutImage        UseXPutImage        true
  701.     useXSetTile        UseXSetTile        true
  702.     regularFonts        RegularFonts        see below
  703.     symbolFonts        SymbolFonts        see below
  704.     dingbatFonts        DingbatFonts        see below
  705.  
  706. ** Calculated from display metrics.
  707.  
  708.     Notes on Resources:
  709.  
  710.     Ghostscript doesn't look at the default system background and
  711.     foreground colors; if you want to change the background or
  712.     foreground color, you must set them explicitly for Ghostscript.
  713.     (This is a deliberate choice, so that PostScript documents will
  714.     display correctly -- with white = white and black = black --
  715.     by default, even if text windows use other colors.)
  716.  
  717.     The geometry resource only affects window placement.
  718.  
  719.     Resolution is given in pixels per inch.
  720.  
  721.     The font tolerance gives largest acceptable difference in
  722.     height of the screen font.  The tolerance is expressed as
  723.     a percentage of the height of the desired font.
  724.  
  725.     The palette resource can be used to restrict ghostscript to
  726.     using a grayscale or monochrome palette.
  727.  
  728.     The maxRGBRamp and maxGrayRamp control the maximum number of
  729.     colors that ghostscript allocates ahead of time for the dither
  730.     cube/ramp.  Ghostscript will never preallocate more than half
  731.     of the cells in a colormap.  maxDynamicColors controls the
  732.     maximum number of colors that Ghostscript will allocate
  733.     dynamically in the colormap.
  734.  
  735. The use... resources exist primarily to work around bugs in X servers.  In
  736. particular, many versions of DEC's X server (DECwindows) have bugs that
  737. require setting useXPutImage or useXSetTile to false.
  738.  
  739.     Some servers do not implement backing pixmaps properly, or do not
  740.     have enough memory for them.  If you get strange behavior or "out
  741.     of memory" messages, try setting useBackingPixmap to false.
  742.  
  743.     Some servers do not implement tiling properly.  This will show up
  744.     as broad bands of color where dither patterns should appear.  If
  745.     this happens, try setting useXSetTile to false.
  746.  
  747.     Some servers do not implement bitmap/pixmap displaying properly.
  748.     This may show up as white or black rectangles where characters
  749.     should appear, or characters may appear in "inverse video" (e.g.,
  750.     white on a black rectangle).  If this happens, try setting
  751.     useXPutImage to false.
  752.  
  753. To use native X11 fonts, Ghostscript must map PostScript font names to
  754. the XLFD font names.  The regularFonts, symbolFonts, and dingbatFonts
  755. resources give the name mapping for different encodings.  The XLFD font 
  756. name in the mapping must contain seven dashes.  The X driver adds the
  757. additional size and encoding fields to bring the total number of dashes
  758. in the font name to 14.  Here are the default font mappings:
  759.  
  760.   Regular Fonts: (Fonts available in standard or ISO-Latin-1 encoding)
  761.  
  762.     AvantGarde-Book:-Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\
  763.     AvantGarde-BookOblique:-Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\
  764.     AvantGarde-Demi:-Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\
  765.     AvantGarde-DemiOblique:-Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\
  766.     Bookman-Demi:-Adobe-ITC Bookman-Demi-R-Normal--\n\
  767.     Bookman-DemiItalic:-Adobe-ITC Bookman-Demi-I-Normal--\n\
  768.     Bookman-Light:-Adobe-ITC Bookman-Light-R-Normal--\n\
  769.     Bookman-LightItalic:-Adobe-ITC Bookman-Light-I-Normal--\n\
  770.     Courier:-Adobe-Courier-Medium-R-Normal--\n\
  771.     Courier-Bold:-Adobe-Courier-Bold-R-Normal--\n\
  772.     Courier-BoldOblique:-Adobe-Courier-Bold-O-Normal--\n\
  773.     Courier-Oblique:-Adobe-Courier-Medium-O-Normal--\n\
  774.     Helvetica:-Adobe-Helvetica-Medium-R-Normal--\n\
  775.     Helvetica-Bold:-Adobe-Helvetica-Bold-R-Normal--\n\
  776.     Helvetica-BoldOblique:-Adobe-Helvetica-Bold-O-Normal--\n\
  777.     Helvetica-Narrow:-Adobe-Helvetica-Medium-R-Narrow--\n\
  778.     Helvetica-Narrow-Bold:-Adobe-Helvetica-Bold-R-Narrow--\n\
  779.     Helvetica-Narrow-BoldOblique:-Adobe-Helvetica-Bold-O-Narrow--\n\
  780.     Helvetica-Narrow-Oblique:-Adobe-Helvetica-Medium-O-Narrow--\n\
  781.     Helvetica-Oblique:-Adobe-Helvetica-Medium-O-Normal--\n\
  782.     NewCenturySchlbk-Bold:-Adobe-New Century Schoolbook-Bold-R-Normal--\n\
  783.     NewCenturySchlbk-BoldItalic:-Adobe-New Century Schoolbook-Bold-I-Normal--\n\
  784.     NewCenturySchlbk-Italic:-Adobe-New Century Schoolbook-Medium-I-Normal--\n\
  785.     NewCenturySchlbk-Roman:-Adobe-New Century Schoolbook-Medium-R-Normal--\n\
  786.     Palatino-Bold:-Adobe-Palatino-Bold-R-Normal--\n\
  787.     Palatino-BoldItalic:-Adobe-Palatino-Bold-I-Normal--\n\
  788.     Palatino-Italic:-Adobe-Palatino-Medium-I-Normal--\n\
  789.     Palatino-Roman:-Adobe-Palatino-Medium-R-Normal--\n\
  790.     Times-Bold:-Adobe-Times-Bold-R-Normal--\n\
  791.     Times-BoldItalic:-Adobe-Times-Bold-I-Normal--\n\
  792.     Times-Italic:-Adobe-Times-Medium-I-Normal--\n\
  793.     Times-Roman:-Adobe-Times-Medium-R-Normal--\n\
  794.     ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal--
  795.  
  796.   Symbol Fonts:  (using Symbol encoding)
  797.  
  798.     Symbol: -Adobe-Symbol-Medium-R-Normal--
  799.  
  800.   Dingbat Fonts: (using Dingbat encoding)
  801.  
  802.     ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--
  803.  
  804. For X11/NeWS, one can use the OpenWindows scalable fonts instead, which
  805. will give good quality output for any point size.  In this environment,
  806. the relevant section of the resource file should look like this:
  807.  
  808. Ghostscript.regularFonts: \
  809.     AvantGarde-Book:        -itc-avantgarde-book-r-normal-- \n\
  810.     AvantGarde-BookOblique:        -itc-avantgarde-book-o-normal-- \n\
  811.     AvantGarde-Demi:        -itc-avantgarde-demi-r-normal-- \n\
  812.     AvantGarde-DemiOblique:        -itc-avantgarde-demi-o-normal-- \n\
  813.     Bembo:                -monotype-bembo-medium-r-normal-- \n\
  814.     Bembo-Bold:            -monotype-bembo-bold-r-normal-- \n\
  815.     Bembo-BoldItalic:        -monotype-bembo-bold-i-normal-- \n\
  816.     Bembo-Italic:            -monotype-bembo-medium-i-normal-- \n\
  817.     Bookman-Demi:            -itc-bookman-demi-r-normal-- \n\
  818.     Bookman-DemiItalic:        -itc-bookman-demi-i-normal-- \n\
  819.     Bookman-Light:            -itc-bookman-light-r-normal-- \n\
  820.     Bookman-LightItalic:        -itc-bookman-light-i-normal-- \n\
  821.     Courier:            -itc-courier-medium-r-normal-- \n\
  822.     Courier-Bold:            -itc-courier-bold-r-normal-- \n\
  823.     Courier-BoldOblique:        -itc-courier-bold-o-normal-- \n\
  824.     Courier-Oblique:        -itc-courier-medium-o-normal-- \n\
  825.     GillSans:            -monotype-gill-medium-r-normal-sans- \n\
  826.     GillSans-Bold:            -monotype-gill-bold-r-normal-sans- \n\
  827.     GillSans-BoldItalic:        -monotype-gill-bold-i-normal-sans- \n\
  828.     GillSans-Italic:        -monotype-gill-normal-i-normal-sans- \n\
  829.     Helvetica:            -linotype-helvetica-medium-r-normal-- \n\
  830.     Helvetica-Bold:            -linotype-helvetica-bold-r-normal-- \n\
  831.     Helvetica-BoldOblique:        -linotype-helvetica-bold-o-normal-- \n\
  832.     Helvetica-Narrow:        -linotype-helvetica-medium-r-narrow-- \n\
  833.     Helvetica-Narrow-Bold:        -linotype-helvetica-bold-r-narrow-- \n\
  834.     Helvetica-Narrow-BoldOblique:    -linotype-helvetica-bold-o-narrow-- \n\
  835.     Helvetica-Narrow-Oblique:    -linotype-helvetica-medium-o-narrow-- \n\
  836.     Helvetica-Oblique:        -linotype-helvetica-medium-o-normal-- \n\
  837.     LucidaBright:            -b&h-lucidabright-medium-r-normal-- \n\
  838.     LucidaBright-Demi:        -b&h-lucidabright-demibold-r-normal-- \n\
  839.     LucidaBright-DemiItalic:    -b&h-lucidabright-demibold-i-normal-- \n\
  840.     LucidaBright-Italic:        -b&h-lucidabright-medium-i-normal-- \n\
  841.     LucidaSans:            -b&h-lucida-medium-r-normal-sans- \n\
  842.     LucidaSans-Bold:        -b&h-lucida-bold-r-normal-sans- \n\
  843.     LucidaSans-BoldItalic:        -b&h-lucida-bold-i-normal-sans- \n\
  844.     LucidaSans-Italic:        -b&h-lucida-medium-i-normal-sans- \n\
  845.     LucidaSans-Typewriter:        -b&h-lucidatypewriter-medium-r-normal-sans- \n\
  846.     LucidaSans-TypewriterBold:    -b&h-lucidatypewriter-bold-r-normal-sans- \n\
  847.     NewCenturySchlbk-BoldItalic:    -linotype-new century schoolbook-bold-i-normal-- \n\
  848.     NewCenturySchlbk-Bold:        -linotype-new century schoolbook-bold-r-normal-- \n\
  849.     NewCenturySchlbk-Italic:    -linotype-new century schoolbook-medium-i-normal-- \n\
  850.     NewCenturySchlbk-Roman:        -linotype-new century schoolbook-medium-r-normal-- \n\
  851.     Palatino-Bold:            -linotype-palatino-bold-r-normal-- \n\
  852.     Palatino-BoldItalic:        -linotype-palatino-bold-i-normal-- \n\
  853.     Palatino-Italic:        -linotype-palatino-medium-i-normal-- \n\
  854.     Palatino-Roman:            -linotype-palatino-medium-r-normal-- \n\
  855.     Rockwell:            -monotype-rockwell-medium-r-normal-- \n\
  856.     Rockwell-Bold:            -monotype-rockwell-bold-r-normal-- \n\
  857.     Rockwell-BoldItalic:        -monotype-rockwell-bold-i-normal-- \n\
  858.     Rockwell-Italic:        -monotype-rockwell-medium-i-normal-- \n\
  859.     Times-Bold:            -linotype-times-bold-r-normal-- \n\
  860.     Times-BoldItalic:        -linotype-times-bold-i-normal-- \n\
  861.     Times-Italic:            -linotype-times-medium-i-normal-- \n\
  862.     Times-Roman:            -linotype-times-medium-r-normal-- \n\
  863.     Utopia-Bold:            -adobe-utopia-bold-r-normal-- \n\
  864.     Utopia-BoldItalic:        -adobe-utopia-bold-i-normal-- \n\
  865.     Utopia-Italic:            -adobe-utopia-regular-i-normal-- \n\
  866.     Utopia-Regular:            -adobe-utopia-regular-r-normal-- \n\
  867.     ZapfChancery-MediumItalic:    -itc-zapfchancery-medium-i-normal-- \n
  868. Ghostscript.dingbatFonts: \
  869.     ZapfDingbats:            -itc-zapfdingbats-medium-r-normal--
  870. Ghostscript.symbolFonts: \
  871.     Symbol:                --symbol-medium-r-normal--
  872.  
  873. Users who switch regularly between different X servers may wish to use the
  874. '*' wild card in place of the foundry name (itc, monotype, linotype, b&h,
  875. or adobe); users who do not switch X servers should leave the explicit
  876. foundry in the name, since it speeds up font accessing.
  877.  
  878. To set these resources, put them in a file (such as ~/.Xdefaults) in the
  879. following form:
  880.  
  881. Ghostscript*geometry:    -0+0
  882. Ghostscript*xResolution: 72
  883. Ghostscript*yResolution: 72
  884.  
  885. Then load the defaults into the X server:
  886.  
  887. % xrdb -merge ~/.Xdefaults
  888.  
  889. Ghostscript will take advantage of the "HP XLFD Enhancements," if
  890. available, to use native X11 fonts for fonts that are anamorphically
  891. scaled, rotated, or mirrored.  If the user has installed these changes to
  892. their X or font server, they will automatically be used when appropriate.
  893.  
  894. SCO Unix
  895. --------
  896.  
  897. Because of bugs in the SCO Unix kernel, Ghostscript will not work if you
  898. select direct screen output (gdevsco.c) and also allow it to write messages
  899. on the console.  If you are using direct screen output, redirect
  900. Ghostscript's terminal output to a file.
  901.  
  902. ********
  903. ******** Switches
  904. ********
  905.  
  906. Unless otherwise noted, these apply to all platforms.
  907.  
  908. Normal switches
  909. ---------------
  910.  
  911.     @filename
  912.         Causes Ghostscript to read filename and treat its
  913.         contents the same as the command line.  (This is
  914.         intended primarily for getting around MS-DOS's
  915.         128-character limit on the length of a command line.)
  916.         Switches or file names in the file may be separated by
  917.         any amount of white space (space, tab, line break);
  918.         there is no limit on the size of the file.
  919.  
  920.     -- filename arg1 ...
  921.     -+ filename arg1 ...
  922.         Takes the next argument as a file name as usual, but takes
  923.         all remaining arguments (even if they have the syntactic
  924.         form of switches) and defines the name ARGUMENTS in
  925.         userdict (not systemdict) as an array of those strings,
  926.         *before* running the file.  When Ghostscript finishes
  927.         executing the file, it exits back to the shell.
  928.  
  929.     -@ filename arg1 ...
  930.         Does the same thing as -- and -+, but expands @filename
  931.         arguments.
  932.  
  933.     -c tokens ...
  934.         Interprets arguments, up to the next argument that begins
  935.         with - followed by a non-digit or with @, as PostScript
  936.         code.  For example, if the file quit.ps contains just
  937.         the word `quit', the following are equivalent:
  938.             quit.ps
  939.         and
  940.             -c quit
  941.         Each argument must be exactly one token, as defined by
  942.         the `token' operator.
  943.  
  944.     -Dname=token
  945.     -dname=token
  946.         Define a name in systemdict with the given definition.
  947.         The token must be exactly one token (as defined by the
  948.         'token' operator) and must not contain any whitespace.
  949.  
  950.     -Dname
  951.     -dname
  952.         Define a name in systemdict with value=true.
  953.  
  954.     -Sname=string
  955.     -sname=string
  956.         Define a name in systemdict with a given string as value.
  957.         This is different from -d.  For example,
  958.             -dname=35
  959.         is equivalent to the program fragment
  960.             /name 35 def
  961.         whereas
  962.             -sname=35
  963.         is equivalent to
  964.             /name (35) def
  965.  
  966.     -uname
  967.         Un-define a name, cancelling -d or -s.
  968.  
  969.     -q
  970.         Quiet startup -- suppress normal startup messages,
  971.         and also do the equivalent of -dQUIET.
  972.  
  973.     -ffilename
  974.         Execute the given file, even if its name begins with a -
  975.         or an @.  -f alone does nothing, but it provides a
  976.         convenient way to terminate the list of tokens for the -c
  977.         switch.
  978.  
  979.     -gnumber1xnumber2
  980.         Equivalent to -dDEVICEWIDTH=number1 and
  981.         -dDEVICEHEIGHT=number2.  This is for the benefit of
  982.         devices (such as X11 windows and VESA displays) that require
  983.         (or allow) width and height to be specified.
  984.  
  985.     -rnumber
  986.     -rnumber1xnumber2
  987.         Equivalent to -dDEVICEXRESOLUTION=number1 and
  988.         -dDEVICEYRESOLUTION=number2.  This is for the benefit of
  989.         devices (such as printers) that support multiple
  990.         X and Y resolutions.
  991.  
  992.     -Idirectories
  993.         Adds the designated list of directories at the head of the
  994.         search path for library files.
  995.  
  996.     -P
  997.         Makes Ghostscript look first in the current directory for
  998.         library files.  This is currently the default.
  999.     -P-
  1000.         Makes Ghostscript *not* look first in the current directory
  1001.         for library files (unless, of course, the first explicitly
  1002.         supplied directory is `.').
  1003.  
  1004.     -
  1005.         This is not really a switch.  It indicates to Ghostscript
  1006.         that the standard input is coming from a file or a pipe.
  1007.         Ghostscript reads from stdin until reaching end-of-file,
  1008.         executing it like any other file, and then continues
  1009.         processing the command line.  At the end of the command
  1010.         line, Ghostscript exits rather than going into its
  1011.         interactive mode.  NOTE: this switch works only for
  1012.         PostScript, not for PDF.
  1013.  
  1014. Note that gs_init.ps makes systemdict read-only, so the values of names
  1015. defined with -D/d/S/s cannot be changed (although, of course, they can be
  1016. superseded by definitions in userdict or other dictionaries.)
  1017.  
  1018. Special names
  1019. -------------
  1020.  
  1021. -dDISKFONTS
  1022.     causes individual character outlines to be loaded from the disk
  1023. the first time they are encountered.  (Normally Ghostscript loads all the
  1024. character outlines when it loads a font.)  This may allow loading more
  1025. fonts into RAM, at the expense of slower rendering.
  1026.  
  1027. -dFIXEDMEDIA
  1028.     causes the media size to be fixed after initialization, which causes
  1029. pages of other sizes or orientations to be rotated or scaled automatically.
  1030. (This switch is something of a hack; when all the drivers have been updated
  1031. to report correct values for their available media, the switch will be
  1032. removed.)  -g automatically sets -dFIXEDMEDIA, but -sPAPERSIZE= does not.
  1033.  
  1034. -dFIXEDRESOLUTION
  1035.     causes the media resolution to be fixed similarly.  -r automatically
  1036. sets -dFIXEDRESOLUTION.
  1037.  
  1038. -dLOCALFONTS
  1039.     causes Type 1 fonts to be loaded into the current VM, which is
  1040. normally local VM, instead of always being loaded into global VM.  Only
  1041. useful for compatibility with Adobe printers for loading some obsolete
  1042. fonts.
  1043.  
  1044. -dNOBIND
  1045.     disables the 'bind' operator.  Only useful for debugging.
  1046.  
  1047. -dNOCACHE
  1048.     disables character caching.  Only useful for debugging.
  1049.  
  1050. -dNOCIE
  1051.     substitutes DeviceGray and DeviceRGB for CIEBasedA and CIEBasedABC
  1052. color spaces respectively.  Only useful on very slow systems where color
  1053. accuracy is less important.
  1054.  
  1055. -dNODISPLAY
  1056.     suppresses the normal initialization of the output device.  This
  1057. may be useful when debugging.
  1058.  
  1059. -dNOFONTMAP
  1060.     suppresses the normal loading of the Fontmap file.  This may be
  1061. useful in environments without a file system.
  1062.  
  1063. -dNOGC
  1064.     disables the garbage collector in Level 2 systems.  Only
  1065. useful for debugging.
  1066.  
  1067. -dNOPAUSE
  1068.     disables the prompt and pause at the end of each page.  This may
  1069. be desirable for applications where another program is 'driving'
  1070. Ghostscript.
  1071.  
  1072. -dNOPLATFONTS
  1073.     disables the use of fonts supplied by the underlying platform
  1074. (X Windows or Microsoft Windows).  This may be needed if the platform
  1075. fonts look undesirably different from the scalable fonts.
  1076.  
  1077. -dNOPROMPT
  1078.     disables only the prompt, but not the pause, at the end of each
  1079. page.  This may be useful on PC displays that get confused if a program
  1080. attempts to write text to the console while the display is in a graphics
  1081. mode.
  1082.  
  1083. -dORIENT1
  1084.     indicates that the file uses a value of 1 to indicate portrait
  1085. orientation to setpage[params] rather than the default orientation of 0.
  1086. This is needed for some files produced by badly designed applications that
  1087. 'know' that the output will be printed on certain roll-media printers.
  1088.  
  1089. -dSAFER
  1090.     disables the deletefile and renamefile operators, and the
  1091. ability to open files in any mode other than read-only.  This may be
  1092. desirable for spoolers or other sensitive environments.
  1093.  
  1094. -dSHORTERRORS
  1095.     makes certain error and information messages more Adobe-compatible.
  1096.  
  1097. -dWRITESYSTEMDICT
  1098.     leaves systemdict writable.  This is necessary when running
  1099. special utility programs such as font2c and pcharstr, which must bypass
  1100. normal PostScript access protection.
  1101.  
  1102. -sDEVICE=device
  1103.     selects an alternate initial output device, as described above.
  1104.  
  1105. -sFONTMAP=filename
  1106.     specifies an alternate name for the Fontmap file.
  1107.  
  1108. -sOutputFile=filename
  1109.     selects an alternate output file (or pipe) for the initial output
  1110. device, as described above.
  1111.  
  1112. -sSUBSTFONT=fontname
  1113.     causes the given font to be substituted for all unknown fonts,
  1114. instead of using the normal intelligent substitution algorithm.
  1115.  
  1116. Debugging switches
  1117. ------------------
  1118.  
  1119. The -Z switch only applies if the interpreter was built for a
  1120. debugging configuration (DEBUG=1 or -DDEBUG selected at compile
  1121. time).
  1122.  
  1123.     -A    Fill empty storage with a distinctive bit pattern
  1124.         for debugging.  Equivalent to -Z@.
  1125.  
  1126.     -E    Turn on tracing of error returns from operators.
  1127.         Equivalent to -Z#.
  1128.  
  1129.     -Mn    Force the interpreter's allocator to acquire additional
  1130.         memory in units of nK, rather than the default (currently
  1131.         20K on MS-DOS systems, 50K on Unix).  n is a positive
  1132.         decimal integer (not exceeding 63 on MS-DOS systems).
  1133.  
  1134.     -Nn    Allocate space for nK names, rather than the default
  1135.         (normally 64K).  n > 64 is only allowed if the interpreter
  1136.         was compiled with EXTEND_NAMES defined.
  1137.  
  1138.     -Zxxx    Turn on debugging printout.
  1139.         Each of the xxx characters selects an option.
  1140.         Case is significant.
  1141.             0 = garbage collector, minimal detail
  1142.             1 = type 1 font interpreter (type1addpath)
  1143.             2 = curve subdivider/rasterizer
  1144.               3 = curve subdivider/rasterizer, detail
  1145.             4 = garbage collector (strings)
  1146.               5 = garbage collector (strings, detail)
  1147.             6 = garbage collector (chunks, roots)
  1148.               7 = garbage collector (objects)
  1149.               8 = garbage collector (refs)
  1150.               9 = garbage collector (pointers)
  1151.             a = allocator (large blocks only)
  1152.               A = allocator (all calls)
  1153.             b = bitmap image processor
  1154.               B = bitmap images, detail
  1155.             c = color/halftone mapper
  1156.             d = dictionary put/undef
  1157.               D = dictionary lookups
  1158.             e = external (OS-related) calls
  1159.             f = fill algorithm (summary)
  1160.               F = fill algorithm (detail)
  1161.             g = gsave/grestore[all]
  1162.             h = halftone renderer
  1163.               H = halftones, every pixel
  1164.             i = interpreter, just names
  1165.               I = interpreter, everything
  1166.             j = (Japanese) composite fonts
  1167.             k = character cache & xfonts
  1168.               K = character cache, every access
  1169.             l = command lists, bands
  1170.               L = command lists, everything
  1171.             m = makefont and font cache
  1172.             n = name lookup (new names only)
  1173.             o = outliner (stroke)
  1174.               O = stroke detail
  1175.             p = path tracer
  1176.             q = clipping
  1177.             r = arc renderer
  1178.             s = streams
  1179.               S = scanner
  1180.             t = tiling algorithm
  1181.             u = undo saver (for save/restore), finalization
  1182.               U = undo saver, more detail
  1183.             v = rectangle fill
  1184.               V = device-level output
  1185.             w = compression encoder/decoder
  1186.             x = transformations
  1187.             y = Type 1 hints
  1188.               Y = Type 1 hints, every access
  1189.             z = trapezoid fill
  1190.             # = operator error returns
  1191.             ~ = math functions
  1192.         The following switches select debugging options other than
  1193.         printout.
  1194.             $ = set unused parts of object references to
  1195.                 identifiable garbage values
  1196.             + = use minimum-size stack blocks
  1197.             . = use small-memory table sizes even on
  1198.                 large-memory machines
  1199.             ? = validate pointers before, during and after GC,
  1200.                 also before and after save and restore
  1201.             @ = fill newly allocated, garbage-collected, and
  1202.                 freed storage with a marker (a1, c1, and
  1203.                 f1 respectively)
  1204.  
  1205. ********
  1206. ******** Frequently Asked Questions
  1207. ********
  1208.  
  1209. Q: The spacing of characters / words / margins on the display is
  1210. wrong, what can I do?
  1211.  
  1212. A: This is almost always caused by differences between the character
  1213. widths that were used to format the document and the character widths
  1214. of the fonts installed in your system.  (This only affects the
  1215. display, and only with window systems, not with MS-DOS.)  If this
  1216. happens, invoke Ghostscript with the -dNOPLATFONTS switch, or (on X
  1217. Windows) set
  1218.     Ghostscript*useExternalFonts: false
  1219. in your X resource file.
  1220.  
  1221. For more information about fonts on the display, please read the
  1222. first sections of fonts.doc.
  1223.  
  1224. Q: On my H-P LaserJet, why do I only get a partial page of output, or a
  1225. single page gets split across two sheets?
  1226.  
  1227. A: Printing on a Hewlett-Packard LaserJet at full resolution (300 DPI)
  1228. requires a printer with at least 1.5 Mb of memory.  150 DPI printing
  1229. requires only .5 Mb.  You can select 150 DPI printing with the command
  1230. line switch
  1231.     -r150
  1232. (This is not necessary on DeskJet printers.)
  1233.  
  1234. Q: On my MS-DOS system using GS.EXE (Borland compiler), why do I get a
  1235. `limitcheck in setdevice' or `VMerror in setdevice' error message?
  1236.  
  1237. A: On MS-DOS systems using the Borland compiler, if Ghostscript gives you
  1238. a 'limitcheck in setdevice' error, it may mean Ghostscript's standard
  1239. buffer size wasn't large enough.  Likewise, if Ghostscript gives you a
  1240. 'VMerror in setdevice' error, it means the buffer size was too large.  You
  1241. can use the -dBufferSpace= switch to set the buffer size to a different
  1242. value, e.g.,
  1243.     -dBufferSpace=50000
  1244. The default value is 25000; the smallest value Ghostscript accepts is
  1245. 10000; the largest valid value is 65000.
  1246.